import { deleteRequest, getRequest, postRequest, putRequest } from "@/utils/api.js"

// 获取告警静默策略信息(分页)
export function getStrategyByPage(params = {}) {
	return postRequest('/alarm/silence/getPageData', params);
}

// 新增告警静默策略信息
export function addStrategy(params = {}) {
	return postRequest('/alarm/silence', params);
}

// 更新告警静默策略信息
export function updateStrategy(params = {}) {
	return putRequest('/alarm/silence', params);
}

// 删除告警静默策略信息
export function deleteStrategy(id) {
	return deleteRequest('/alarm/silence/' + id);
}

// 静默配置更新启用开关
export function strategyEnabled(params = {}) {
	return postRequest('/alarm/silence/enabled', params);
}